<template>
  <div style="padding: 20px;">
    <div class="headerBoxList">
      <svg t="1686534349030" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2484" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M870.4 661.312H960v59.712h-89.6v89.6c0 41.216-18.496 59.712-59.712 59.712h-89.6V960h-59.712v-89.6H541.888V960h-59.776v-89.6H362.688V960h-59.776v-89.6h-89.6c-41.216 0-59.712-18.496-59.712-59.712v-89.6H64v-59.712h89.6V541.888H64v-59.776h89.6V362.688H64v-59.712h89.6v-89.6c0-41.28 18.496-59.776 59.712-59.776h89.6V64h59.712v89.6h119.488V64h59.712v89.6h119.488V64h59.712v89.6h89.6c41.216 0 59.712 18.496 59.712 59.712v89.6H960v59.712h-89.6v119.488H960v59.712h-89.6v119.488z m-59.712-448H213.312v597.312h597.312V213.312zM332.8 302.912h358.4c20.608 0 29.888 9.216 29.888 29.888v358.4c0 20.608-9.28 29.888-29.888 29.888H332.8c-20.608 0-29.888-9.28-29.888-29.888V332.8c0-20.608 9.28-29.888 29.888-29.888z" p-id="2485"></path></svg>
      <span style="margin-left: 10px">CPU信息 <span style="font-size: 15px;" v-if="total!==0">({{ total }}行)</span></span>
    </div>
    <div class="content">
      <p style="border-bottom: 1px solid #ebebeb;" v-for="(item,index) in list" :key="index">· {{ item }}</p>
    </div>
  </div>
</template>

<script>
  import { getRxTmpPathApi } from '@/api/phoneInfo/index'
export default {
    name:'CPU', 
    data(){
        return{
            list:[],
            total:0,
        }
    },
    mounted(){
        this.init();
    },
    methods:{
    init(){

      let node = this.$route.params.nodeData.data;
      let dataJson = {
        "proof_num":node.proof_num,
        "rxTmpPath":'/'+node.subtype
      }
      getRxTmpPathApi(dataJson).then(res=>{
        let str = res.data;
        let arr = str.split("\n");
        this.list = arr;
        this.total = arr.length;
      }).catch(error=>{
       
      })
    },
    }

}
</script>

<style scoped>
    .headerBoxList {
      width: 100%;
      height: 50px;
      border-bottom: 1px solid #d2d2d2;
      display: flex;
      align-items: center;
      font-size: 18px;
      font-weight: bold;
    }
  .content{
    height: 80vh;
    overflow-y: auto;
    padding-left:50px;
    margin-top: 20px;
}
  @media screen and (min-width: 2360px) {
    .content{
    height:67vh;
    overflow-y: auto;

  }
  }
</style>